package com.example.app.components


import android.graphics.drawable.shapes.Shape
import android.util.Log
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun ButtonSample() {
    // enabled 是否禁用
    // shape 按钮形状
    // 内边距需设置大于16
//    Button(
//        onClick = {
//            Log.d("====", "按钮点击了")
//        },
//        enabled = true,
//        shape = MaterialTheme.shapes.medium,
//        colors = ButtonDefaults.buttonColors(backgroundColor = Color.Blue, contentColor = Color.Yellow)
//    ) {
//        // 默认横向布局
//        Text(text = "按钮")
//    }

//    TextButton(onClick = { /*TODO*/ }) {
//        Text(text = "Text Button")
//    }

        OutlinedButton(onClick = { /*TODO*/ }) {
            Text(text = "OutlinedButton")
        }
}

@Preview(showSystemUi = true)
@Composable
fun ButtonSamplePreview() {
    ButtonSample()
}

